#ifndef TCPCONNECTIONFACTORY_H
#define TCPCONNECTIONFACTORY_H

#include "core_global.h"
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>

class TcpConnection;
class AsyncService;

class TcpConnectionFactory : protected boost::noncopyable
{
public:
    typedef boost::shared_ptr< TcpConnection > ConnectionPtr;

public:
    TcpConnectionFactory(AsyncService &service);
    ~TcpConnectionFactory();

    ConnectionPtr create();

protected:
    void destroy(TcpConnection *con);

private:
    AsyncService &m_service;
};

#endif // TCPCONNECTIONFACTORY_H
